package com.thiswhyme.ratelimiter.core;

import com.thiswhyme.common.response.IResponseCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.io.Serializable;

/**
 * @description: 限流相关异常码
 * @author: thiswhyme
 * @date: 2021/8/30
 */
@Getter
@AllArgsConstructor
public enum RateLimitResponseCode implements IResponseCode, Serializable {

    /**
     * 资源被限流
     */
    LIMIT_EXCEPTION("00020", "请求过于频繁，请稍后再试"),

    /**
     * 降级方法执行失败
     */
    FALLBACK_EXCEPTION("00020", "降级方法执行失败");

    private String code;
    private String msg;
}
